import { lazy } from "react";
const twoReact: any = [
    {
        path: '/index/home',
        element: lazy(() => import('../page/index/Home'))
    },
    {
        path: '/index/cart',
        element: lazy(() => import('../page/index/Cart'))
    },
    {
        path: '/index/classfiy',
        element: lazy(() => import('../page/index/Classfiy'))
    },
    {
        path: '/index/my',
        element: lazy(() => import('../page/index/My'))
    }
];
const mainRouter: any = [
    {
        path: '/index',
        element: lazy(() => import('../page/Index')),
        children: twoReact
    },
    {
        path: "/login",
        element: lazy(() => import('../page/Login'))
    },
    {
        path: "/reg",
        element: lazy(() => import('../page/Reg'))
    },
    {
        path: '/ding/:id',
        element: lazy(() => import('../page/Ding'))
    },
    {
        path: '/listsd',
        element: lazy(() => import('../page/Listsd'))
    },
    {
        path: "/",
        to: '/index/home'
    },

]
export default mainRouter